{% extends "layout_ajax.html" %}

{% block content %}
  <table>
    <tbody>
      {% for item in objects %}
        <tr class="{% cycle 'odd' 'even' %}{% ifnotequal item.exitcode 0 %} exiterror{% endifnotequal %}">
          <td>
            <span>Task UUID:</span> {{ item.taskuuid }}<br />
            <span>File UUID:</span> {{ item.fileuuid }}<br />
            <span>File name:</span> {{ item.filename }}<br />
            <span>Client:</span> {{ item.client }}<br />
            <span>&nbsp;</span> {{ item.exec_field }} (exit code: {{ item.exitcode }})
          </td>
          <td>
            <abbr title="Start time">ST:</abbr> {{ item.starttime }}<br />
            <abbr title="End time">ET:</abbr> {{ item.endtime }}<br />
            <abbr title="Created time">CT:</abbr> {{ item.createdtime }}
          </td>
        </tr>
        {% ifnotequal item.exitcode 0 %}
          {% if item.stderror %}
            <tr>
              <td colspan="3" class="stderror"><pre>{{ item.stderror }}</pre></td>
            </tr>
          {% endif %}
        {% endifnotequal %}
      {% endfor %}
    </tbody>
  </table>
{% endblock %}
